ABS
Section: C Library Functions (3)
Updated: May 15, 1985
Index
Return to Main Contents
NAME
abs, labs - integer absolute value
SYNOPSIS
#include <stdlib.h>
int abs(i)
int i;
long int labs(i)
long int i;
DESCRIPTION
Abs
returns the absolute value of its integer operand. Labs is
similar to abs except that its argument and its resul are both
of type long int.
SEE ALSO
floor(3M) for
fabs
BUGS
Applying the abs function to the most negative integer generates a
result which is the most negative integer. That is,
- abs(0x80000000)
-
returns 0x80000000 as a result.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 04:54:14 GMT, January 31, 2023